home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWCommon / Include / SLPriDeb.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  1.8 KB  |  72 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLPriDeb.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLPRIDEB_H
  11. #define SLPRIDEB_H
  12.  
  13. #include "FWEnvDef.h"
  14.  
  15. #ifndef SLPRISTR_H
  16. #include "SLPriStr.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. // Extern C Methods
  21. //========================================================================================
  22.  
  23. // Export or Import functions for CFM-68K [sfu]
  24.  
  25. #if defined(FW_ODFLIB_IMPORT)
  26. #pragma import on
  27. #elif defined(FW_ODFLIB)
  28. #pragma export on
  29. #endif
  30.  
  31. FW_EXTERN_C_BEGIN
  32.  
  33.     FW_EXPORT void FW_PrivDebugger();
  34.         // Stop execution, drop into a debugger
  35.         
  36.     FW_EXPORT void FW_PrivDebugMessage(const char *message);
  37.         // Stop execution, drop into a debugger, and display message
  38.     
  39. #ifdef FW_DEBUG
  40.  
  41.     #define FW_PRIV_DEBUGGER_BREAK()             FW_PrivDebugger()
  42.     
  43.     #define FW_PRIV_DEBUGGER_STRING(message)     FW_PrivDebugMessage(message)
  44.  
  45.     #define FW_PRIV_ASSERT(f)                     if(!(f)) FW_PrivDebugMessage(#f)
  46.         // If f evaluates to false, drop into the debugger and display f as string.
  47.  
  48.     // Convenient symbolic constants to be used with assertions for indicating
  49.     // that some feature is not yet implemented, or that a method must be overridden
  50.     const FW_Boolean Not_Yet_Implemented = false;
  51.     const FW_Boolean Subclass_Responsibility = false;
  52.  
  53. #else
  54.  
  55.     #define FW_PRIV_DEBUGGER_BREAK()                ((void)0)
  56.     #define FW_PRIV_DEBUGGER_STRING(message)        ((void)0)
  57.     #define FW_PRIV_ASSERT(f)                        ((void)0)
  58.  
  59. #endif
  60.  
  61. FW_EXTERN_C_END
  62.  
  63. // For CFM-68K [sfu]
  64.  
  65. #if defined(FW_ODFLIB_IMPORT)
  66. #pragma import off
  67. #elif defined(FW_ODFLIB)
  68. #pragma export off
  69. #endif
  70.  
  71. #endif
  72.